package com.qujia.station.service.impl;

import com.qujia.station.domain.Grade;
import com.qujia.station.domain.Oil;
import com.qujia.station.mapper.GradeMapper;
import com.qujia.station.mapper.OilMapper;
import com.qujia.station.service.IGradeService;
import com.qujia.station.service.IOilService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 油站信息Service业务层处理
 * 
 * @author qujia
 * @date 2020-12-08
 */
@Service
public class GradeServiceImpl implements IGradeService
{
    @Autowired
    private GradeMapper gradeMapper;

    /**
     * 查询等级信息
     *
     * @param gradeId 等级信息ID
     * @return 油品信息
     */
    public Grade selectGradeById(Long gradeId){
        return  gradeMapper.selectGradeById(gradeId);
    }

    /**
     * 查询等级信息列表
     *
     * @param grade 等级信息
     * @return 等级信息集合
     */
    public List<Grade> selectGradeList(Grade grade){
        return gradeMapper.selectGradeList(grade);
    }

    /**
     * 新增等级信息
     *
     * @param grade 等级信息
     * @return 结果
     */
    public int insertGrade(Grade grade){
        return gradeMapper.insertGrade(grade);
    }

    /**
     * 修改等级信息
     *
     * @param grade 等级信息
     * @return 结果
     */
    public int updateGrade(Grade grade){
        return gradeMapper.updateGrade(grade);
    }

    /**
     * 删除等级信息
     *
     * @param gradeId 等级信息ID
     * @return 结果
     */
    public int deleteGradeById(Long gradeId){
        return gradeMapper.deleteGradeById(gradeId);
    }

    /**
     * 批量删除等级信息
     *
     * @param gradeIds 需要删除的数据ID
     * @return 结果
     */
    public int deleteGradeByIds(Long[] gradeIds){
        return gradeMapper.deleteGradeByIds(gradeIds);
    }

}
